create  external table jms_ods.yl_sys_package_diff_snapshot
(
  package_different_id      bigint    comment  '差异化建包id'
  ,express_org_code          string    comment '网点编码'
  ,express_org_name          string    comment  '网点名称'
  ,sender_province_id        bigint    comment  '发件省id'
  ,sender_province_name      string    comment  '发件省名称'
  ,sender_city_id            bigint    comment  '发件市id'
  ,sender_city_name          string    comment  '发件市名称'
  ,sender_district_id        bigint    comment  '发件区id'
  ,sender_district_name      string    comment  '发件区名称'
  ,sender_town_id            bigint    comment  '发件镇id'
  ,sender_town_name          string    comment  '发件镇名称'
  ,consolidation_id          bigint    comment  '末端集包地id'
  ,consolidation_code        string    comment '末端集包地编码'
  ,consolidation_name        string    comment  '末端集包地名称'
  ,express_center_code       string    comment  '末端中心编码'
  ,express_center_short_code string    comment  '一段码'
  ,create_by                 bigint    comment  '创建人id'
  ,update_by               bigint    comment  '最后更新人id'
  ,create_by_name            string    comment  '创建人名称'
  ,update_by_name          string    comment  '最后修改人名称'
  ,create_time               string    comment  '创建时间'
  ,update_time             string    comment  '更新时间'
  ,operator                  string    comment  '操作人'
  ,express_center_name       string    comment  '末端中心名称'
  ,type                      int       comment  '包类型'
  ,express_agent_code        string    comment  '代理区编码'
  ,express_agent_name        string    comment  '代理区'
  ,name                      string    comment  '建包名称'
  ,version                   string    comment  '建包名称'
  ,snapshot_time             string    comment  '快照时间'
)comment  '差异化版本计划历史修改表 '
PARTITIONED BY (
  `dt` string COMMENT '时间分区')
ROW FORMAT SERDE
  'org.apache.hadoop.hive.ql.io.parquet.serde.ParquetHiveSerDe'
STORED AS INPUTFORMAT
  'org.apache.hadoop.hive.ql.io.parquet.MapredParquetInputFormat'
OUTPUTFORMAT
  'org.apache.hadoop.hive.ql.io.parquet.MapredParquetOutputFormat'
LOCATION
  '/dw/hive/jms_ods.db/external/yl_sys_package_diff_snapshot';